import React, { useState } from 'react'

const Demo2 = () => {
    // 数组解构
    const [count, setCount] = useState(0)
    return (
        <div>
            <p>您点击了 {count} 次</p>
            <button
                onClick={() => {
                    setCount(count + 1)
                }}
            >
                加
            </button>
        </div>
    )
}

export default Demo2
